home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form2
- BorderStyle = 3 'Fixed Dialog
- Caption = "Carregar Imagem"
- ClientHeight = 4290
- ClientLeft = 45
- ClientTop = 345
- ClientWidth = 6105
- Icon = "Form2.frx":0000
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4290
- ScaleWidth = 6105
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command2
- Caption = "&OK"
- Height = 495
- Left = 2040
- TabIndex = 4
- Top = 3720
- Width = 1935
- End
- Begin VB.DriveListBox Drive1
- Height = 315
- Left = 120
- TabIndex = 3
- Top = 3240
- Width = 2895
- End
- Begin VB.DirListBox Dir1
- Height = 3015
- Left = 120
- TabIndex = 2
- Top = 120
- Width = 2895
- End
- Begin VB.FileListBox File1
- Height = 3405
- Hidden = -1 'True
- Left = 3120
- Pattern = "*.bmp;*.gif;*.jpg;*.wmf"
- System = -1 'True
- TabIndex = 1
- Top = 120
- Width = 2895
- End
- Begin VB.CommandButton Command1
- Caption = "&Cancelar"
- Height = 495
- Left = 4080
- TabIndex = 0
- Top = 3720
- Width = 1935
- End
- Begin VB.Image Image1
- Height = 9000
- Left = 5040
- Picture = "Form2.frx":0442
- Top = 0
- Visible = 0 'False
- Width = 12000
- End
- Attribute VB_Name = "Form2"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Compare Text
- Private Sub Command1_Click()
- 'Cancel was pressed. Unload the Image Loader Form
- Unload Me
- End Sub
- Private Sub Command2_Click()
- 'Ok was pressed. Set the puzzle new image
- Dim S As String
- 'Get the file's path and check if it already has a "\"
- 'If not then add one "\"
- S = File1.Path
- If Not S Like "*\" Then S = S & "\"
- 'Now add the file name
- S = S & File1.FileName
- 'Unload the Image Loader Form
- Unload Me
- 'Load the puzzle new image
- Image1.Picture = LoadPicture(S)
- 'Hide the pieces and start again
- HideAll
- Start
- End Sub
- Private Sub Dir1_Change()
- 'Set the FileListBox Path equal to the DirListBox
- File1.Path = Dir1.Path
- End Sub
- Private Sub Drive1_Change()
- On Error Resume Next
- 'Set the DirListBox Path equal to the DriveListBox
- 'selected drive
- Dir1.Path = UCase(Drive1.Drive)
- 'Error 68 ocurrs when there is an error with access to
- 'the Drive
- If Err.Number = 68 Then
- Err.Clear
- 'Check if the user want's to retry
- If MsgBox("The drive " & Drive1.Drive & " is not ready! Try again?", vbApplicationModal + vbExclamation + vbYesNo, "Error") = vbYes Then GoTo RR
- 'Else set the Drive to the default C: drive
- Drive1.Drive = "C:\"
- End If
- End Sub
-